package com.apress.springrecipes.shop;

public class Calculator <T extends Number> {
	private T number;
	
	public void setNumber(T t) {
		this.number = t;
	}
	
	public void printType() {
		System.out.println(number.getClass());
	}
	
	public <U, V> void printSum(U first, V second) {
		System.out.println(first.getClass());
		System.out.println(second.getClass());
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Calculator<Long> longCalc = new Calculator<Long>();
		longCalc.setNumber(new Long(0));
		longCalc.printType();
		longCalc.<Integer, Double>printSum(19, 1.2);
	}

}
